import React, { useState } from 'react';
import Button from '@mui/material/Button';
import Dialog from '@mui/material/Dialog';
import DialogActions from '@mui/material/DialogActions';
import DialogContent from '@mui/material/DialogContent';
import DialogContentText from '@mui/material/DialogContentText';
import DialogTitle from '@mui/material/DialogTitle';

function App() {
  const [open, setOpen] = useState(false);

  const handleOpen = () => setOpen(true);
  const handleClose = () => setOpen(false);

  return (
    <div>
      <Button variant="contained" onClick={handleOpen}>
        打开对话框
      </Button>

      <Dialog open={open} onClose={handleClose}>
        <DialogTitle>确定要给下面用户重置密码？</DialogTitle>
        <DialogContent>
          <DialogContentText>
            18352417539,
            默认密码：zwz123456
          </DialogContentText>
        </DialogContent>
        <DialogActions>
          <Button onClick={handleClose}>取消</Button>
          <Button onClick={handleClose} autoFocus>
            确定
          </Button>
        </DialogActions>
      </Dialog>
    </div>
  );
}

export default App;